package com.ssyan.appointment.hosp.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ssyan.appointment.hosp.mapper.HospitalSetMapper;
import com.ssyan.appointment.hosp.service.HospitalSetService;
import com.ssyan.appointment.model.hosp.HospitalSet;
import org.springframework.stereotype.Service;

/*
* Service实现类先继承MP提供的ServiceImpl，泛型为Mapper接口和实体类，再实现Service接口
* */
@Service
public class HospitalSetServiceImpl extends ServiceImpl<HospitalSetMapper, HospitalSet>
        implements HospitalSetService {
    @Override
    public String getSignKey(String hoscode) {
        HospitalSet hospitalSet = baseMapper.selectOne(new QueryWrapper<HospitalSet>().eq("hoscode", hoscode));
        return hospitalSet.getSignKey();
    }
}
